import request from '@/router/axios'

export function save (data) {
  return request({
    url: '/car',
    method: 'post',
    data:data
  })
}

export function edit (data) {
  return request({
    url: '/car',
    method: 'put',
    data:data
  })
}

export function page (data) {
  return request({
    url: '/car/page',
    method: 'get',
    params:data
  })
}

export function deleteById (id) {
  return request({
    url: '/car/'+id,
    method: 'delete'
  })
}

export function bindRfidCardNo (data) {
  return request({
    url: '/car/bind',
    method: 'post',
    data:data
  })
}

export function getByOwnerId (id) {
  return request({
    url: '/car/ownerId/'+id,
    method: 'get'
  })
}
